package com.sangcomz.fishbun.ui.detail.ui;

import ohos.aafwk.ability.Ability;
import ohos.aafwk.content.Intent;
import ohos.aafwk.content.Operation;

public class DetailImageAbility extends Ability{

    public static final String INIT_IMAGE_POSITION = "init_image_position";

    @Override
    protected void onStart(Intent intent) {
        super.onStart(intent);
        super.setMainRoute(DetailImageAbilitySlice.class.getName());
    }

    public static Intent getDetailImageActivity(int initPosition) {

        Intent intent = new Intent();
        Operation operation = new Intent.OperationBuilder()
                .withDeviceId("")
                .withBundleName("com.harmonyos.fishbun")
                .withAbilityName("com.sangcomz.fishbun.ui.detail.ui.DetailImageAbility")
                .build();
        intent.setOperation(operation);

        intent.setParam(INIT_IMAGE_POSITION, initPosition);
        return intent;
    }
}
